package com.muyu.blog.controller;

import com.muyu.blog.entity.vo.Result;
import com.muyu.blog.service.TagService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(tags = "tagsConroller",description = "标签")
@RestController
@RequestMapping("tags")
public class TagsController {

    @Autowired
    private TagService tagService;

    @ApiOperation("热门标签")
    @GetMapping("hot")
    public Result hot(){
        int limit=6;
        return tagService.hots(limit);
    }
}
